import request from '@/utils/request'
import { USER_GET } from '../constants'

export const userGetAc = (payload) => ({
  type: USER_GET,
  payload,
})

export const userGet = () => {
  return async (dispatch) => {
    const { data } = await request.get('/user/profile')
    dispatch(userGetAc(data.data))
  }
}
